
project (deep_test)
# 在文件开头添加工具链配置（放在project()之前）
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)

set(CMAKE_SYSTEM_NAME Linux)        #设置目标系统名字 
set(CMAKE_SYSTEM_PROCESSOR arm) #设置目标处理器架构 
 
#  指定编译器的 sysroot 路径 
set(TOOLCHAIN_DIR /opt/fsl-imx-x11/4.1.15-2.1.0/sysroots) 
set(CMAKE_SYSROOT ${TOOLCHAIN_DIR}/cortexa7hf-neon-poky-linux-gnueabi) 
 
#  指定交叉编译器 arm-linux-gcc 
set(CMAKE_C_COMPILER ${TOOLCHAIN_DIR}/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc) 
 
#  为编译器添加编译选项 
set(CMAKE_C_FLAGS "-march=armv7ve -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a7") 
 
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
# 将第一行版本要求升级到3.5或更高
cmake_minimum_required (VERSION 3.16)



# 或直接指定具体文件（如果知道文件名）
 set(SRC_LIST 
   # deepseek_test.c
    ../deepseek_api.c
    ../../http_client/http_client.c
    ../../../lib/cjson/cJSON.c
 )
   include_directories(../../../lib/openssl/openssl)
   include_directories(../../../lib/curl/curl)
  include_directories(../../../lib/cjson)
 include_directories(../../../config)
include_directories (../)
include_directories (../../http_client)  # 同步修正头文件路径
add_executable (deep_test ${SRC_LIST})


link_directories (${PROJECT_SOURCE_DIR} ../../../lib/curl)
target_link_libraries (${PROJECT_NAME}  libcurl.so)